package com.yn.common.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ZyTransportTypeEnum {

    CRITICAL(1, "重症"),
    REHABILITATION(2, "康复")


    ;

    private Integer code;

    private String name;

    public static ZyTransportTypeEnum getByCode(Integer code) {
        if(null == code) {
            return null;
        }
        for(ZyTransportTypeEnum transportTypeEnum : ZyTransportTypeEnum.values()) {
            if(transportTypeEnum.getCode() == code) {
                return transportTypeEnum;
            }
        }
        return null;
    }

}
